<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>管理员界面</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../layui/css/layui.css"  media="all">
    <script src="../js/jquery-3.4.1.min.js"></script>
    <script src="../layui/layui.js"></script>
    <script src="../js/staff.js"></script>

    <script>
        layui.config({
            base: "../layui/"
        }).extend({
            treeSelect: "lay/treeSelect/treeSelect"
        });
    </script>

    <script>
        $(function () {
            layui.use(['laydate'],function () {
                var laydate=layui.laydate;

                laydate.render({
                    elem: '#staffStartdate'
                });

                laydate.render({
                    elem:'#staffOutdate'
                });
            })
        })
    </script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px; text-align: center">
    <legend>用户管理界面</legend>
</fieldset>

<form class="layui-form" action="" id="form" lay-filter="example" enctype="multipart/form-data">
    <input type="hidden" name="staffID" id="staffID"><!-- 加一个隐藏主键 -->

    <input type="hidden" name="staffPhoto" id="staffPhoto"><!-- 加一个隐藏照片 -->
    <div class="layui-form-item">
        <label class="layui-form-label">员工账号:</label>
        <div class="layui-input-inline">
            <input type="text" name="staffUsername" id="staffUsername" lay-verify="required|staffUsername" autocomplete="off" placeholder="请输入账号!" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">员工密码:</label>
        <div class="layui-input-inline">
            <input type="text" name="staffPassword" id="staffPassword" lay-verify="required|staffPassword"  placeholder="请输入密码!" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">员工姓名:</label>
        <div class="layui-input-inline">
            <input type="text" name="staffName" id="staffName" lay-verify="required|staffName"  placeholder="请输入姓名!" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">员工手机号:</label>
        <div class="layui-input-inline">
            <input type="text" name="staffPhone" id="staffPhone"  lay-verify="required|staffPhone" placeholder="请输入手机号!" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">员工身份证:</label>
        <div class="layui-input-inline">
            <input type="text" name="staffIdcard"  id="staffIdcard" lay-verify="required|staffIdcard" placeholder="请输入身份证!" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">入职时间:</label>
        <div class="layui-input-inline">
            <input type="text" name="staffStartdate" id="staffStartdate" class="layui-input" placeholder="yyyy-mm-dd">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">离职时间:</label>
        <div class="layui-input-inline">
            <input type="text" name="staffOutdate" id="staffOutdate"  class="layui-input" placeholder="yyyy-mm-dd">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">员工性别:</label>
        <div class="layui-input-inline">
            <select name="staffSex">
                <option value="">===请选择===</option>
                <option value="1" >男</option>
                <option value="2" >女</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">员工住址:</label>
        <div class="layui-input-inline">
            <input type="text" name="staffHome"   placeholder="请输入住址!" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">员工部门:</label>
        <div class="layui-input-inline">
            <select name="sectionId" id="sectionId" lay-filter="sect">

            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">员工职位:</label>
        <div class="layui-input-inline">
            <select name="postId" id="postId">


            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 50px;text-align: center">地区</label>
        <div class="layui-input-inline">
            <input type="text" id="mapId"  name="mapId" lay-filter="tree" readonly class="layui-input"style="width:120px">
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">员工备注:</label>
        <div class="layui-input-inline">
            <textarea name="staffRemark"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">员工照片:</label>
        <div class="layui-input-inline">
            <input type="file" name="staffPhoto_" autocomplete="off" class="layui-input">
            <img src="" id="staffPhoto_img" alt="预览照片"  style="display: none">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="button" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="button" class="layui-btn layui-btn-primary" onclick="javascrtpt:window.location.href='/wjc/department.html'" id="close_btn">返回</button>
        </div>
    </div>
</form>
